<?php

namespace common\model;

use think\model\RelationModel;

class UrgeMessageModel extends RelationModel
{
    //自动验证
    protected $_validate = [
        ['content', '', '', self::EXISTS_VALIDATE, 'array'],
        ['type', ['app', 'sms'], '', self::EXISTS_VALIDATE, 'in'],
    ];

    // 自动完成
    protected $_auto = [
        ['content', 'json_encode', self::EXISTS_VALIDATE, 'function'],
        ['created', 'time', self::MODEL_INSERT, 'function']
    ];
}
